function hideMessage() {
    var ok = document.getElementById("msgOK");
    addClass(ok, 'msg-hidden');
}

function addClass(el, name){
    el.className += (el.className ? ' ' : '') +name;
}